﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

/// <summary>
///Article 的摘要说明
/// </summary>
public class Article
{
    DBControl dbcontrol = new DBControl();

	public Article()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}

    public ArticleInfo GetLatestArticle(string category)
    {
        string sql = string.Format("SELECT * FROM tb_ArticleInfo WHERE Category = '{0}'", category);
        //string sql = string.Format("SELECT * FROM tb_ArticleInfo", category);
        DataSet ds = dbcontrol.GetDataSet(sql, "tb_ArticleInfo");
        ArticleInfo article_info = new ArticleInfo(ds);
        ds.Dispose();
        return article_info;
    }
}
